import java.util.ArrayList;
import java.util.List;


public class PrimeFinderTestToN implements PrimeFinder {

	@Override
	public boolean isPrime(int n) {
		for (int i=2; i<n; i++)
			if (n % i == 0)
				return false;
		
		return true;
	}

	@Override
	public List<Integer> primesLessThanN(int n) {
		ArrayList<Integer> primes = new ArrayList<Integer>();
		
		for (int i=2; i<=n; i++)
			if (isPrime(i))
				primes.add(i);
		
		return primes;
	}

}
